package A1;

import javax.swing.*;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: Sarah
 * Date: 17/08/2011
 * Time: 2:40:42 PM
 * To change this template use File | Settings | File Templates.
 */

public class elevatorState extends JPanel {
    private int num = 0;

    JLabel liftInfo1 = new JLabel("");
    JLabel liftInfo2 = new JLabel("");
    JLabel liftInfo3 = new JLabel("");
    JButton enterButton = new JButton("Enter");
    JButton exitButton = new JButton("Exit");

    /**
     * Sets the elevator layout
     */
    public elevatorState() {
        JPanel jpInfo = new JPanel();
        JPanel jpPeople = new JPanel();

        jpInfo.setBackground(Color.LIGHT_GRAY);
        jpPeople.setBackground(Color.LIGHT_GRAY);

        jpInfo.setLayout(new GridLayout(3, 1));
        jpInfo.add(liftInfo1);
        jpInfo.add(liftInfo2);
        jpInfo.add(liftInfo3);

        jpPeople.setLayout(new FlowLayout());

        setLayout(new GridLayout(2, 1));
        add(jpInfo);
        add(jpPeople);
    }

    /**
     * Returns the number of the floor the elevator has been called to
     */
    public int getNum() {
        return num;
    }

    /**
     * Sets the number of the floor the elevator has been called to
     */
    public void setNum(int num) {
        this.num = num;
    }
}